package com.eight.travel.controller;

import com.eight.travel.service.OrderService;
import com.eight.travel.utils.BaseResp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
public class HotelOrderController {

    @Autowired
    OrderService orderService;

    //查看用户酒店订单
    @GetMapping("/order/selectHByUid")
    public BaseResp selectHByUid(Integer uid){
        return orderService.selectHByUid(uid);
    }

    //退订酒店
    @PostMapping("/order/updateHotelOrder")
    public BaseResp updateHotelOrder(Integer hroominfoid){
        return orderService.updateHotelOrder(hroominfoid);
    }
}
